package com.solcoo.dao;

import java.sql.SQLException;
import javax.annotation.Resource;
import org.springframework.stereotype.Repository;
import com.ibatis.sqlmap.client.SqlMapClient;
import com.solcoo.pojo.SOB;

@Repository
public class SOBDao {

	@Resource
	private SqlMapClient sqlMapClient;
	
	public boolean addSOB(SOB sob) throws SQLException {
		sqlMapClient.insert("addSOB", sob);
				
		if (sob.getId() > 0)
			return true;
		else
			return false;
	}
	
	public SOB getSOB(String sob) throws SQLException {
		return (SOB) sqlMapClient.queryForObject("getSOB", sob);
	}
	
}